<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TableViolationReport class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TableViolationReport object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TableViolationReportMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TableViolationReport $TableViolationReport the actual TableViolationReport data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QIntegerTextBox $UserIdReportedControl
	 * property-read QLabel $UserIdReportedLabel
	 * property QTextBox $UserNameControl
	 * property-read QLabel $UserNameLabel
	 * property QTextBox $UserNameReportedControl
	 * property-read QLabel $UserNameReportedLabel
	 * property QIntegerTextBox $ProjectIdControl
	 * property-read QLabel $ProjectIdLabel
	 * property QIntegerTextBox $ViolationTypeControl
	 * property-read QLabel $ViolationTypeLabel
	 * property QTextBox $MessageControl
	 * property-read QLabel $MessageLabel
	 * property QDateTimePicker $ReportDateControl
	 * property-read QLabel $ReportDateLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TableViolationReportMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTableViolationReport;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TableViolationReport's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $txtUserIdReported;
		protected $txtUserName;
		protected $txtUserNameReported;
		protected $txtProjectId;
		protected $txtViolationType;
		protected $txtMessage;
		protected $calReportDate;
		protected $txtStatus;

		// Controls that allow the viewing of TableViolationReport's individual data fields
		protected $lblUserId;
		protected $lblUserIdReported;
		protected $lblUserName;
		protected $lblUserNameReported;
		protected $lblProjectId;
		protected $lblViolationType;
		protected $lblMessage;
		protected $lblReportDate;
		protected $lblStatus;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TableViolationReportMetaControl to edit a single TableViolationReport object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TableViolationReport object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableViolationReportMetaControl
		 * @param TableViolationReport $objTableViolationReport new or existing TableViolationReport object
		 */
		 public function __construct($objParentObject, TableViolationReport $objTableViolationReport) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TableViolationReportMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TableViolationReport object
			$this->objTableViolationReport = $objTableViolationReport;

			// Figure out if we're Editing or Creating New
			if ($this->objTableViolationReport->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableViolationReportMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TableViolationReport object creation - defaults to CreateOrEdit
 		 * @return TableViolationReportMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTableViolationReport = TableViolationReport::Load($intId);

				// TableViolationReport was found -- return it!
				if ($objTableViolationReport)
					return new TableViolationReportMetaControl($objParentObject, $objTableViolationReport);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TableViolationReport object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TableViolationReportMetaControl($objParentObject, new TableViolationReport());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableViolationReportMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableViolationReport object creation - defaults to CreateOrEdit
		 * @return TableViolationReportMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TableViolationReportMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableViolationReportMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableViolationReport object creation - defaults to CreateOrEdit
		 * @return TableViolationReportMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TableViolationReportMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTableViolationReport->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTableViolationReport->User) && ($this->objTableViolationReport->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTableViolationReport->User) ? $this->objTableViolationReport->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtUserIdReported
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtUserIdReported_Create($strControlId = null) {
			$this->txtUserIdReported = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtUserIdReported->Name = QApplication::Translate('User Id Reported');
			$this->txtUserIdReported->Text = $this->objTableViolationReport->UserIdReported;
			$this->txtUserIdReported->Required = true;
			return $this->txtUserIdReported;
		}

		/**
		 * Create and setup QLabel lblUserIdReported
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblUserIdReported_Create($strControlId = null, $strFormat = null) {
			$this->lblUserIdReported = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserIdReported->Name = QApplication::Translate('User Id Reported');
			$this->lblUserIdReported->Text = $this->objTableViolationReport->UserIdReported;
			$this->lblUserIdReported->Required = true;
			$this->lblUserIdReported->Format = $strFormat;
			return $this->lblUserIdReported;
		}

		/**
		 * Create and setup QTextBox txtUserName
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUserName_Create($strControlId = null) {
			$this->txtUserName = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUserName->Name = QApplication::Translate('User Name');
			$this->txtUserName->Text = $this->objTableViolationReport->UserName;
			$this->txtUserName->Required = true;
			$this->txtUserName->MaxLength = TableViolationReport::UserNameMaxLength;
			return $this->txtUserName;
		}

		/**
		 * Create and setup QLabel lblUserName
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserName_Create($strControlId = null) {
			$this->lblUserName = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserName->Name = QApplication::Translate('User Name');
			$this->lblUserName->Text = $this->objTableViolationReport->UserName;
			$this->lblUserName->Required = true;
			return $this->lblUserName;
		}

		/**
		 * Create and setup QTextBox txtUserNameReported
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUserNameReported_Create($strControlId = null) {
			$this->txtUserNameReported = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUserNameReported->Name = QApplication::Translate('User Name Reported');
			$this->txtUserNameReported->Text = $this->objTableViolationReport->UserNameReported;
			$this->txtUserNameReported->Required = true;
			$this->txtUserNameReported->MaxLength = TableViolationReport::UserNameReportedMaxLength;
			return $this->txtUserNameReported;
		}

		/**
		 * Create and setup QLabel lblUserNameReported
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserNameReported_Create($strControlId = null) {
			$this->lblUserNameReported = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserNameReported->Name = QApplication::Translate('User Name Reported');
			$this->lblUserNameReported->Text = $this->objTableViolationReport->UserNameReported;
			$this->lblUserNameReported->Required = true;
			return $this->lblUserNameReported;
		}

		/**
		 * Create and setup QIntegerTextBox txtProjectId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtProjectId_Create($strControlId = null) {
			$this->txtProjectId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtProjectId->Name = QApplication::Translate('Project Id');
			$this->txtProjectId->Text = $this->objTableViolationReport->ProjectId;
			return $this->txtProjectId;
		}

		/**
		 * Create and setup QLabel lblProjectId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblProjectId_Create($strControlId = null, $strFormat = null) {
			$this->lblProjectId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProjectId->Name = QApplication::Translate('Project Id');
			$this->lblProjectId->Text = $this->objTableViolationReport->ProjectId;
			$this->lblProjectId->Format = $strFormat;
			return $this->lblProjectId;
		}

		/**
		 * Create and setup QIntegerTextBox txtViolationType
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtViolationType_Create($strControlId = null) {
			$this->txtViolationType = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtViolationType->Name = QApplication::Translate('Violation Type');
			$this->txtViolationType->Text = $this->objTableViolationReport->ViolationType;
			$this->txtViolationType->Required = true;
			return $this->txtViolationType;
		}

		/**
		 * Create and setup QLabel lblViolationType
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblViolationType_Create($strControlId = null, $strFormat = null) {
			$this->lblViolationType = new QLabel($this->objParentObject, $strControlId);
			$this->lblViolationType->Name = QApplication::Translate('Violation Type');
			$this->lblViolationType->Text = $this->objTableViolationReport->ViolationType;
			$this->lblViolationType->Required = true;
			$this->lblViolationType->Format = $strFormat;
			return $this->lblViolationType;
		}

		/**
		 * Create and setup QTextBox txtMessage
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtMessage_Create($strControlId = null) {
			$this->txtMessage = new QTextBox($this->objParentObject, $strControlId);
			$this->txtMessage->Name = QApplication::Translate('Message');
			$this->txtMessage->Text = $this->objTableViolationReport->Message;
			$this->txtMessage->TextMode = QTextMode::MultiLine;
			return $this->txtMessage;
		}

		/**
		 * Create and setup QLabel lblMessage
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblMessage_Create($strControlId = null) {
			$this->lblMessage = new QLabel($this->objParentObject, $strControlId);
			$this->lblMessage->Name = QApplication::Translate('Message');
			$this->lblMessage->Text = $this->objTableViolationReport->Message;
			return $this->lblMessage;
		}

		/**
		 * Create and setup QDateTimePicker calReportDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calReportDate_Create($strControlId = null) {
			$this->calReportDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calReportDate->Name = QApplication::Translate('Report Date');
			$this->calReportDate->DateTime = $this->objTableViolationReport->ReportDate;
			$this->calReportDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calReportDate;
		}

		/**
		 * Create and setup QLabel lblReportDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblReportDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblReportDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblReportDate->Name = QApplication::Translate('Report Date');
			$this->strReportDateDateTimeFormat = $strDateTimeFormat;
			$this->lblReportDate->Text = sprintf($this->objTableViolationReport->ReportDate) ? $this->objTableViolationReport->ReportDate->__toString($this->strReportDateDateTimeFormat) : null;
			return $this->lblReportDate;
		}

		protected $strReportDateDateTimeFormat;


		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTableViolationReport->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTableViolationReport->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}



		/**
		 * Refresh this MetaControl with Data from the local TableViolationReport object.
		 * @param boolean $blnReload reload TableViolationReport from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTableViolationReport->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTableViolationReport->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTableViolationReport->User) && ($this->objTableViolationReport->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTableViolationReport->User) ? $this->objTableViolationReport->User->__toString() : null;

			if ($this->txtUserIdReported) $this->txtUserIdReported->Text = $this->objTableViolationReport->UserIdReported;
			if ($this->lblUserIdReported) $this->lblUserIdReported->Text = $this->objTableViolationReport->UserIdReported;

			if ($this->txtUserName) $this->txtUserName->Text = $this->objTableViolationReport->UserName;
			if ($this->lblUserName) $this->lblUserName->Text = $this->objTableViolationReport->UserName;

			if ($this->txtUserNameReported) $this->txtUserNameReported->Text = $this->objTableViolationReport->UserNameReported;
			if ($this->lblUserNameReported) $this->lblUserNameReported->Text = $this->objTableViolationReport->UserNameReported;

			if ($this->txtProjectId) $this->txtProjectId->Text = $this->objTableViolationReport->ProjectId;
			if ($this->lblProjectId) $this->lblProjectId->Text = $this->objTableViolationReport->ProjectId;

			if ($this->txtViolationType) $this->txtViolationType->Text = $this->objTableViolationReport->ViolationType;
			if ($this->lblViolationType) $this->lblViolationType->Text = $this->objTableViolationReport->ViolationType;

			if ($this->txtMessage) $this->txtMessage->Text = $this->objTableViolationReport->Message;
			if ($this->lblMessage) $this->lblMessage->Text = $this->objTableViolationReport->Message;

			if ($this->calReportDate) $this->calReportDate->DateTime = $this->objTableViolationReport->ReportDate;
			if ($this->lblReportDate) $this->lblReportDate->Text = sprintf($this->objTableViolationReport->ReportDate) ? $this->objTableViolationReport->ReportDate->__toString($this->strReportDateDateTimeFormat) : null;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTableViolationReport->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTableViolationReport->Status;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEVIOLATIONREPORT OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TableViolationReport instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTableViolationReport() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTableViolationReport->UserId = $this->lstUser->SelectedValue;
				if ($this->txtUserIdReported) $this->objTableViolationReport->UserIdReported = $this->txtUserIdReported->Text;
				if ($this->txtUserName) $this->objTableViolationReport->UserName = $this->txtUserName->Text;
				if ($this->txtUserNameReported) $this->objTableViolationReport->UserNameReported = $this->txtUserNameReported->Text;
				if ($this->txtProjectId) $this->objTableViolationReport->ProjectId = $this->txtProjectId->Text;
				if ($this->txtViolationType) $this->objTableViolationReport->ViolationType = $this->txtViolationType->Text;
				if ($this->txtMessage) $this->objTableViolationReport->Message = $this->txtMessage->Text;
				if ($this->calReportDate) $this->objTableViolationReport->ReportDate = $this->calReportDate->DateTime;
				if ($this->txtStatus) $this->objTableViolationReport->Status = $this->txtStatus->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TableViolationReport object
				$this->objTableViolationReport->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TableViolationReport instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTableViolationReport() {
			$this->objTableViolationReport->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TableViolationReport': return $this->objTableViolationReport;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TableViolationReport fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'UserIdReportedControl':
					if (!$this->txtUserIdReported) return $this->txtUserIdReported_Create();
					return $this->txtUserIdReported;
				case 'UserIdReportedLabel':
					if (!$this->lblUserIdReported) return $this->lblUserIdReported_Create();
					return $this->lblUserIdReported;
				case 'UserNameControl':
					if (!$this->txtUserName) return $this->txtUserName_Create();
					return $this->txtUserName;
				case 'UserNameLabel':
					if (!$this->lblUserName) return $this->lblUserName_Create();
					return $this->lblUserName;
				case 'UserNameReportedControl':
					if (!$this->txtUserNameReported) return $this->txtUserNameReported_Create();
					return $this->txtUserNameReported;
				case 'UserNameReportedLabel':
					if (!$this->lblUserNameReported) return $this->lblUserNameReported_Create();
					return $this->lblUserNameReported;
				case 'ProjectIdControl':
					if (!$this->txtProjectId) return $this->txtProjectId_Create();
					return $this->txtProjectId;
				case 'ProjectIdLabel':
					if (!$this->lblProjectId) return $this->lblProjectId_Create();
					return $this->lblProjectId;
				case 'ViolationTypeControl':
					if (!$this->txtViolationType) return $this->txtViolationType_Create();
					return $this->txtViolationType;
				case 'ViolationTypeLabel':
					if (!$this->lblViolationType) return $this->lblViolationType_Create();
					return $this->lblViolationType;
				case 'MessageControl':
					if (!$this->txtMessage) return $this->txtMessage_Create();
					return $this->txtMessage;
				case 'MessageLabel':
					if (!$this->lblMessage) return $this->lblMessage_Create();
					return $this->lblMessage;
				case 'ReportDateControl':
					if (!$this->calReportDate) return $this->calReportDate_Create();
					return $this->calReportDate;
				case 'ReportDateLabel':
					if (!$this->lblReportDate) return $this->lblReportDate_Create();
					return $this->lblReportDate;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TableViolationReport fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'UserIdReportedControl':
						return ($this->txtUserIdReported = QType::Cast($mixValue, 'QControl'));
					case 'UserNameControl':
						return ($this->txtUserName = QType::Cast($mixValue, 'QControl'));
					case 'UserNameReportedControl':
						return ($this->txtUserNameReported = QType::Cast($mixValue, 'QControl'));
					case 'ProjectIdControl':
						return ($this->txtProjectId = QType::Cast($mixValue, 'QControl'));
					case 'ViolationTypeControl':
						return ($this->txtViolationType = QType::Cast($mixValue, 'QControl'));
					case 'MessageControl':
						return ($this->txtMessage = QType::Cast($mixValue, 'QControl'));
					case 'ReportDateControl':
						return ($this->calReportDate = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>